<?php
include '../common.php';
var_dump($_POST);
$rule = [
	'user_name' => ['kong','用户名不能为空'],
	'password'  => ['kong','密码不能为空'],
	'password1' => ['kong','确定密码不能为空'],
	'email'     => ['kong','邮箱不能为空'],
	'email'     => ['is_email','邮箱格式不正确'],
	'name'      => ['kong','姓名不能为空'],
	'id'        => ['kong','身份证号不能为空'],
	'id'        => ['is_id','身份证号不正确'],
	'phone'     => ['kong','电话不能为空'],
	'phone'     => ['is_phone','电话不正确'],
	'gender'    => ['kong','性别不能为空'],
	'code'      => ['kong','验证码不能为空'],
];
$a = panduan($rule);
if($a['code'] == 0){
	exit($a['msg']);
}

$name      = trim($_POST['user_name']);
$password  = trim($_POST['password']);
$password1 = trim($_POST['password1']);
$email     = trim($_POST['email']);
$id        = trim($_POST['id']);
$phone     = trim($_POST['phone']);
$code      = trim($_POST['code']);

if ($password !== $password1) {
	exit('两次密码不一致');
}


